/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';
import { TreeDataModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BasCalbody extends BasicModel<BasCalbody> {
  viewCode?: string; // 库存组织编码
  name?: string; // 库存组织名称
  pkCorp?: string; // 所属公司主键
  status?: string; // 状态
}

export const basCalbodyList = (params?: BasCalbody | any) =>
  defHttp.get<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/list', params });

export const basCalbodyListData = (params?: BasCalbody | any) =>
  defHttp.post<Page<BasCalbody>>({ url: adminPath + '/bas/calbody/basCalbody/listData', params });

export const basCalbodyForm = (params?: BasCalbody | any) =>
  defHttp.get<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/form', params });

export const basCalbodySave = (params?: any, data?: BasCalbody | any) =>
  defHttp.postJson<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/save', params, data });

export const basCalbodyDisable = (params?: BasCalbody | any) =>
  defHttp.get<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/disable', params });

export const basCalbodyEnable = (params?: BasCalbody | any) =>
  defHttp.get<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/enable', params });

export const basCalbodyDelete = (params?: BasCalbody | any) =>
  defHttp.get<BasCalbody>({ url: adminPath + '/bas/calbody/basCalbody/delete', params });

export const basCalbodyTreeData = (params?: any) =>
  defHttp.get<TreeDataModel[]>({ url: adminPath + '/bas/calbody/basCalbody/treeData', params });
